html(lang="zh")
	head
		meta(charset="UTF-8")
		title KB4409 - #{title}
		block resources
			link(rel="stylesheet" href="assets/css/material.min.css")
			link(rel="stylesheet" href="assets/css/wrks.css")
			link(href="https://cdn.bootcss.com/material-design-icons/3.0.1/iconfont/material-icons.min.css" rel="stylesheet")
			script(src="assets/js/material.min.js")
			script(src="assets/js/common.js")
	body
		.mdl-layout__container
			.mdl-layout.mdl-js-layout.mdl-layout--fixed-header.has-drawer
				header.mdl-layout__header
					.mdl-layout__header-row
						span.mdl-layout__title= title
						.mdl-layout-spacer
						nav.mdl-navigation.mdl-layout--large-screen-only
							if username
								a.mdl-navigation__link(href="/me")= username
							else
								a.mdl-navigation__link(href="/login") 登录
				.mdl-layout__drawer
					nav.mdl-navigation
						a.mdl-navigation__link(href="/") 主页
						a.mdl-navigation__link(href="/find") 搜索
						a.mdl-navigation__link(href="/kb/random") 随机
						if username
							a.mdl-navigation__link(href="/me") 个人主页
							a.mdl-navigation__link(href="/logout") 登出
						else
							a.mdl-navigation__link(href="/login") 登录或注册
				main.mdl-layout__content
					.page-content
						block content
							p Alan, place some content here.
		.mdl-js-snackbar.mdl-snackbar#snack-bar
			.mdl-snackbar__text
			button.mdl-snackbar__action(type="button")